Skip to content

[stable5.4] fix(submit): only submit the form by button or Ctrl/Cmd+Enter - #3979

Merged
Chartman123 merged 1 commit into
stable5.4from
backport/3951/stable5.4
Nov 21, 2026
Merged

Chartman123 merged 1 commit into
stable5.4from
backport/3951/stable5.4

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 21, 2026

Copy link
Copy Markdown

Backport of PR #3951

Shift+Enter in a short answer submitted the form by accident (#1048).
The questions only caught a plain Enter, so Enter with any modifier
fell through to the browser's implicit form submission, which Chromium
and Firefox also apply to radio buttons, checkboxes and inputs without
their own handler, such as the "Other" answer and grid cells.
Ctrl+Enter, the deliberate shortcut, worked only in a long text answer.

The form now handles Enter once for all its inputs. Ctrl+Enter or
Cmd+Enter submits from any input or text area. Enter with any other
modifier in a single-line input moves on to the next field instead of
submitting, also past the field set of a choice question, where focus
used to stay put. Text areas keep their new line, file inputs open the
file picker, buttons keep their default. The submit button announces
the shortcut with aria-keyshortcuts. The per-question Enter handlers
became dead and are removed.

Enter that confirms an IME candidate is left to the input method. Some
browsers, such as Safari and older Chromium, fire that keydown with
isComposing false but keyCode 229, so both are checked.

Fixes #1048

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@backportbot backportbot Bot added bug Something isn't working 3. to review Waiting for reviews AI assisted labels Nov 21, 2026
@Chartman123
Chartman123 merged commit aeb3493 into stable5.4 Nov 21, 2026
42 checks passed
@Chartman123
Chartman123 deleted the backport/3951/stable5.4 branch November 21, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants